#include "comm.hpp"
#include"log.hpp"
using namespace std;

//客户端
//打开，写进去
int main()
{
    //Init init;
    int fd=open(FIFO_FILE,O_WRONLY);
    if(fd==-1)
    {
        perror("open");
        exit(FIFO_OPEN_ERR);
    }
    cout<<"clent open done"<<endl;
    string line;
    while(true)
    {
        cout<<"Please Enter@ ";
        getline(cin,line);
        write(fd,line.c_str(),line.size());
    }
    close(fd);
    return 0;
}